//
//  BEOrderDetailModel.swift
//  BEGlobalOiler
//
//  Created by KKING on 16/9/19.
//  Copyright © 2016年 Bullseye Energy pte ltd. All rights reserved.
//

import UIKit

class BEOrderDetailModel: NSObject {

    var id: String?
    
    var rigLocation: String?
    
    var orderSn: String?
    
    var rigId: String?
    
    var orderTalentRefVOList: [BEOrderTechModel] = [BEOrderTechModel]()
    
    var orderTime: String?
    
    var expectStartTime: String?
    
    var orderStatusName: String?
    
    var createTime: String?
    
    var actualEndTime: String?
    
    var orderStatus: Int = 0
    
    var companyName: String?
    
    var rigName: String?
    
    var expectEndTime: String?
    
    var estimateAmount: Int = 0
    
    var actualStartTime: String?
    
    var companyId: String?
    
    init(dict: [String : AnyObject]) {
        super.init()
        setValuesForKeys(dict)
    }
    
    override func setValue(_ value: Any?, forUndefinedKey key: String) {
        
    }
    
    override func setValue(_ value: Any?, forKey key: String) {
        if "orderTalentRefVOList" == key {
            if let jsonList = value as? [[String: AnyObject]]{
                var techModelList = [BEOrderTechModel]()
                for item in jsonList {
                    let techModel = BEOrderTechModel(dict: item)
                    techModelList.append(techModel)
                }
                orderTalentRefVOList = techModelList
                return
            }
        }
        return super.setValue(value, forKey: key)
    }
}


class BEOrderTechModel: NSObject {

    
    var id: String?
    
    var talentName: String?
    
    var major: String?
    
    var isNeedBox: Int = 0
    
    var employeeId: String?
    
    var mobile: String?
    
    var statusName: String?
    
    var price: Int = 0
    
    var remark: String?
    
    var orderId: String?
    
    var talentId: String?
    
    var status: Int = 0
    
    var photo: String?

    
    init(dict: [String : AnyObject]) {
        super.init()
        setValuesForKeys(dict)
    }
    
    override func setValue(_ value: Any?, forKey key: String) {
        return super.setValue(value, forKey: key)
    }
    override func setValue(_ value: Any?, forUndefinedKey key: String) {
        
    }
}



